package com.sangeng.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpSession;

@Controller
public class LoginController implements HandlerInterceptor {


    @PostMapping("/login")
    public String login(String username, String password, HttpSession session) {
       session.setAttribute("username",username);
        return "/WEB-INF/page/success.jsp";
    }
}
